A storage device is a disk device that can store data, and it generally includes one or more volatile and non-volatile memories. The volatile memories are used to store running code and operation data, but data stored thereon would be lost automatically if the electricity is turned off. The non-volatile memories are used to permanently store data which can still be maintained when the electricity is turned off, thereby maintaining data persistency and integrity. Generally, the reading and writing speed of non-volatile memories is lower than that of volatile memories.
To prevent data loss, a large backup power supply (for example, a rechargeable battery) is generally arranged in the storage device. If the storage device has a power failure, the backup power supply can act as an emergency power supply to store data that is not stored permanently After the data storage operation is completed, the processor or controller of the storage device issues a signal to turn off the backup power supply. Once the main power supply is restored, the storage device comes back to normal operation.